package com.ckh.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.Date;

@Data
@TableName("exam")
public class Exam {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String title;
    private Date examTime;
    private Integer teacherId;
    private Date createTime;
    private Date updateTime;
    private String location; // 考试地点
    private String teacher;  // 监考老师
    private Integer classId; // 新增：考试班级ID

    @TableField(exist = false)
    private String className; // 新增：班级名称
    
    // 非数据库字段，标记是否已提交
    @TableField(exist = false) 
    private Boolean hasSubmitted;

    public Boolean getHasSubmitted() {
        return hasSubmitted;
    }

    public void setHasSubmitted(Boolean hasSubmitted) {
        this.hasSubmitted = hasSubmitted;
    }

}

